﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DCIStudy.V8
{
    public class People
    {
        public string Name { get; set; }

        public TRole Act<TRole>()
            where TRole : class
        {
            var role = Activator.CreateInstance<TRole>();

            (role as dynamic).People = this;

            return role;
        }
    }
}
